package com.yanqu.road.server.cmd.activity.signindraw;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.SignInDrawProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.signindraw.SignInDrawModule;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_SIGN_IN_DRAW_DRAW_FROM_CROSS, desc = "抽奖")
public class SignInDrawGoCmdFromCross extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {

        SignInDrawProto.CrossSignInDrawGoRespMsg respMsg = SignInDrawProto.CrossSignInDrawGoRespMsg.parseFrom(packet.getBytes());

        ret = player.getModule(SignInDrawModule.class).drawFromCross(respMsg.getRet(), respMsg.getRewardId());

    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
